﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class UserWork_PlanInFo : System.Web.UI.Page
{
    public string topic;
    public string AddTime;
    public string Contents;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["Connection"]);
            con.Open();
            int PlanID = Convert.ToInt32(Request["planid"].ToString());
            string sql = "select * from [plan] where planid="+PlanID+" ";
            SqlCommand com = new SqlCommand(sql,con);
            SqlDataReader dr = com.ExecuteReader();
            if (dr.Read())
            {
                topic=dr["topic"].ToString();
                AddTime = dr["AddTime"].ToString();
                Contents = dr["Content"].ToString();
            }
            con.Close();
        }
    }

}
